import request from '@/config/axios'

/*坐席工作台*/

// 呼叫名单
export const createList = async (data) => {
  return await request.post({ url: `/call/user-callee-list/create`, data })
}
// 批量新增呼叫名单
export const batchCreateList = async (data) => {
  return await request.post({ url: `/call/user-callee-list/batch-create`, data })
}
// 获取呼叫名单分页
export const pageList = async (params) => {
  return await request.get({ url: `/call/user-callee-list/page`, params })
}
//获取呼叫名单号码
export const getList = async (params) => {
  return await request.get({ url: `/call/user-callee-list/get`, params })
}
// 删除呼叫名单
export const delCallee = async (id) => {
  return await request.delete({ url: `/call/user-callee-list/delete?id=` + id })
}
// 话术列表
export const speechList = async (params) => {
  return await request.get({ url: `/call/speech/list`, params })
}
// 坐席所在群呼任务列表
export const agentTaskList = async (params) => {
  return await request.get({ url: `/call/task/agent-simple-list`, params })
}
// 坐席状态变更操作
export const handleAgent = async (data) => {
  return await request.post({ url: `/call/agent/handle-agent`, data })
}
// 添加备注
export const addRemark = async (data) => {
  return await request.post({ url: `/call/record/add-remark`, data })
}
//呼叫名单追加号码从文本
export const appendTxt = async (formData) => {
  return await request.upload({ url: `/call/user-callee-list/append`, data: formData })
}
// 呼叫名单追加号码从文件
export const appendFile = async (formData) => {
  return await request.upload({ url: `/call/user-callee-list/append-by-file`, data: formData })
}
// 删除全部待拨打
export const delCallAll = async () => {
  return await request.delete({ url: `/call/user-callee-list/delete-all` })
}

// 拨号列表号码去重
export const removeRepeat = async () => {
  return await request.post({ url: `/call/user-callee-list/delete-repeat` })
}

// 通知sip注册
export const agentActive = async () => {
  return await request.post({ url: `/call/agent/active` })
}
